#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author:
@contact:
@date: 2016-11-23 16:47
@version: 0.0.0
@license:
@copyright:

"""
import unittest
import requests
class test_http(unittest.TestCase):
    def setUp(self):
        self.base_url = 'http://121.41.178.173:30003/'
    def tearDown(self):
        pass
    def test_case(self):
        self.assertEqual(1,1)
    def test_get_poll_index(self):
        r = requests.get(self.base_url)
        code = r.status_code
        text = r.text
        print(code)
        print(text)
        self.assertEqual(code, 200)
        self.assertIn('Welcome!',text)
#print(__name__)
if __name__ == '__main__':
    print("ok")
    unittest.main()
#print(__name__)
